<?php

class Social_Controller_Browse_Live_Auth
{

	function execute($request)
	{
		$adapter = Nuo::getObject('social/adapter/live');

		$clientApi = $adapter -> getClientApi();

		$for = $request -> getParam('for');

		$offers = 'WL.Basic,WL.Emails';

		if ($for == 'contact')
		{
			$offers = 'Contacts.View';
		}

		$consentUrl = $clientApi -> getConsentUrl($offers);

		Nuo::redirect($consentUrl);
	}

}
